package com.tms.common.core.common;

/**
 * TMS系统常量
 */
public class Constant {
    
    /**
     * 车辆状态常量
     */
    public static final class VehicleStatus {
        /** 可用 */
        public static final int AVAILABLE = 1;
        /** 运输中 */
        public static final int IN_TRANSPORT = 2;
        /** 维修中 */
        public static final int UNDER_MAINTENANCE = 3;
        /** 停用 */
        public static final int DISABLED = 4;
        /** 报废 */
        public static final int SCRAPPED = 5;
    }
    
    /**
     * 驾驶员状态常量
     */
    public static final class DriverStatus {
        /** 空闲 */
        public static final int IDLE = 1;
        /** 出车中 */
        public static final int ON_DUTY = 2;
        /** 休假 */
        public static final int ON_VACATION = 3;
        /** 离职 */
        public static final int RESIGNED = 4;
    }
    
    /**
     * 性别常量
     */
    public static final class Gender {
        /** 未知 */
        public static final int UNKNOWN = 0;
        /** 男 */
        public static final int MALE = 1;
        /** 女 */
        public static final int FEMALE = 2;
    }
    
    /**
     * 是否标志常量
     */
    public static final class YesNo {
        /** 否 */
        public static final int NO = 0;
        /** 是 */
        public static final int YES = 1;
    }
    
    /**
     * 删除标志常量
     */
    public static final class DeleteFlag {
        /** 未删除 */
        public static final int NOT_DELETED = 0;
        /** 已删除 */
        public static final int DELETED = 1;
    }
    
    /**
     * 业务默认值常量
     */
    public static final class DefaultValue {
        /** 默认提醒天数 */
        public static final int DEFAULT_REMIND_DAYS = 30;
        /** 默认分页大小 */
        public static final long DEFAULT_PAGE_SIZE = 10L;
        /** 默认当前页 */
        public static final long DEFAULT_CURRENT_PAGE = 1L;
    }
    
    /**
     * 业务异常消息常量
     */
    public static final class ErrorMessage {
        /** 车牌号已存在 */
        public static final String LICENSE_PLATE_EXISTS = "车牌号已存在：%s";
        /** 手机号已存在 */
        public static final String PHONE_NUMBER_EXISTS = "手机号已存在：%s";
        /** 身份证号已存在 */
        public static final String ID_CARD_EXISTS = "身份证号已存在：%s";
        /** 驾驶证号已存在 */
        public static final String LICENSE_NUMBER_EXISTS = "驾驶证号已存在：%s";
        /** 记录不存在 */
        public static final String RECORD_NOT_FOUND = "记录不存在，ID：%s";
        /** 参数不能为空 */
        public static final String PARAM_NOT_NULL = "参数不能为空：%s";
        /** 状态无效 */
        public static final String INVALID_STATUS = "无效的状态值：%s";
    }
    
    /**
     * 缓存KEY常量
     */
    public static final class CacheKey {
        /** 车辆缓存KEY前缀 */
        public static final String VEHICLE_PREFIX = "tms:vehicle:";
        /** 驾驶员缓存KEY前缀 */
        public static final String DRIVER_PREFIX = "tms:driver:";
        /** 车辆类型缓存KEY */
        public static final String VEHICLE_TYPE_LIST = "tms:vehicle_type:list";
        /** 驾驶证缓存KEY前缀 */
        public static final String DRIVER_LICENSE_PREFIX = "tms:driver_license:";
    }
}
